package com.ysl.project.api.controller;

import com.ysl.framework.web.controller.BaseController;
import com.ysl.framework.web.domain.AjaxResult;
import org.springframework.ui.ModelMap;
import org.springframework.web.bind.annotation.*;

/**
 * @author 姚善利
 * @classname com.ysl.project.api.controller
 * @description  IM客户端用户账号密码验证登录
 * @date 2022/7/8 10:27
 */
@RestController
@RequestMapping("/api")
public class imlogin_controller {

    @RequestMapping()
    @ResponseBody
    public AjaxResult login(String username,String password) {
        if(username.equals("")||password.equals(""))
        {
            return AjaxResult.error("请输入用户名或者密码");
        }
        if(!username.equals("")&&password.equals("1234"))
        {
            return AjaxResult.success(username);
        }
        else
        {
            return AjaxResult.error("用户名密码错误");
        }
    }
}
